package week3;

import java.util.Scanner;

public class q2 {
    public static void main(String[] args) {
       int random = (int)(Math.random()*100);
       int quess;
        Scanner sc=new Scanner(System.in);
        while(true){
            System.out.println("请输入一个0-100以内的数字");
            quess=sc.nextInt();
            if(quess==random) {
                System.out.println("你猜对了");
                break;
            }else if (quess<random) {
                System.out.println("小了");
            }else{
                System.out.println("大了");
            }
        }
    }
}
